import React from "react";
import Row from "./Row";
export default class Checkerboard extends React.Component{
    playChess(row,col){
        this.props.playChess(row,col)
    }

    render(){
        const {boardData} = this.props;
        // const list=new Array(15).fill(0);
        return(

            <div className="checker-board">
                {
                    boardData.map((item,index)=>(
                        <Row playChess={this.playChess.bind(this)} rowData={item} key={index} row={index}/>
                    ))
                }
            </div>
        )

    }
}